#import "BWSymbolCell.h"
#import "BWSymbol.h"

@implementation BWSymbolCell


- (void) drawWithFrame: (NSRect) cellFrame
                inView: (NSView *) controlView
{

    if (cellFrame.size.width > cellFrame.size.height) {
        cellFrame.origin.x += (cellFrame.size.width 
                               - cellFrame.size.height) / 2.0;
        cellFrame.size.width = cellFrame.size.height;
    }

    NSBezierPath *path;
    path = [[self objectValue] pathInRect: cellFrame];

    [[NSColor blackColor] set];
    [path fill];

} // drawWithFrame


- (void) setPlaceholderString: (NSString *) string
{
    // just eat the placeholder if there's no symbol
} // setPlaceholderString

@end // BWSymbolCell
